#Web开发技术栈
# FastAPI现代Web服务示例
from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI()

class Item(BaseModel):
    name: str
    price: float

@app.post("/items/")
async def create_item(item: Item):
    return {"item_name": item.name, "price": item.price}

# 启动命令
# uvicorn main:app --reload --port 8000